/*
 * MPU6000.hpp
 *
 *  Created on: Jun 5, 2016
 *      Author: Yang
 */

#ifndef MPU6000_HPP_
#define MPU6000_HPP_

#include "Maths/Maths.hpp"
#include "HAL/HAL.hpp"
#include "Console/Console.hpp"

class INERTIAL_SENSOR_MPU6000
{
public:
    INERTIAL_SENSOR_MPU6000(){temp = 0;}

    Vector3f accel;
    Vector3f gyro;
    float gx_ca=0,gy_ca=0,gz_ca=0;
    float ax_ca=0,ay_ca=0,az_ca=0;
    float temp = 0;

    void Init(void);
    void Data_calibration(void);
    void Data_Refresh(void);
private:
    void WRITE(uint8_t Data, uint8_t RegAddress);
    void READ(uint8_t* Data, uint8_t RegAddress, uint8_t Len);
};

#endif /* MPU6000_HPP_ */
